package cc.mrbird.febs.buss.controller;


import cc.mrbird.febs.buss.util.ConfigResourceUtil;
import cc.mrbird.febs.buss.util.FileUtils;
import cc.mrbird.febs.common.controller.BaseController;
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.entity.FebsResponse;
import cc.mrbird.febs.common.utils.FebsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.*;
import java.util.*;

/**
 *  Controller
 *
 * @author Lujingyuan
 * @date 2020-02-27 18:08:45
 */
@Slf4j
@Validated
@Controller
public class TestController extends BaseController {

    @RequestMapping("test/config")
    @ResponseBody
    public FebsResponse test(){
        System.out.println("-start--");
        System.out.println(ConfigResourceUtil.getConfigByName("abc"));
        System.out.println(FileUtils.getJarPath());
        System.out.println("-end--");
        return new FebsResponse().success().data(ConfigResourceUtil.getConfigByName("abc"));
    }

}
